package com.adcc.loadsheet.monitor.vo;

import com.adcc.loadsheet.monitor.entity.ForwarderMonitor;
import com.adcc.loadsheet.monitor.entity.MonitorStatus;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.google.common.base.Strings;

public class ForwarderMonitorVO extends BaseVO<ForwarderMonitor> {

    // 第一个程序的IP
    private String firstHost;

    // 第一个程序是否存活
    private boolean firstProgramUp;

    // 第一个程序的航旅接口是否存活
    private boolean firstUmeInterfaceUp;

    // 第二个程序的IP
    private String secondHost;

    // 第二个程序是否存活
    private boolean secondProgramUp;

    // 第二个程序的航旅接口是否存活
    private boolean secondUmeInterfaceUp;

    // 服务状态
    private MonitorStatus status;

    public ForwarderMonitorVO(ForwarderMonitor forwarderMonitor) {
        firstHost = Strings.nullToEmpty(forwarderMonitor.getFirstHost());
        firstProgramUp = forwarderMonitor.isFirstProgramUp();
        firstUmeInterfaceUp = forwarderMonitor.isFirstUmeInterfaceUp();
        secondHost = Strings.nullToEmpty(forwarderMonitor.getSecondHost());
        secondProgramUp = forwarderMonitor.isSecondProgramUp();
        secondUmeInterfaceUp = forwarderMonitor.isSecondUmeInterfaceUp();
        status = forwarderMonitor.getStatus();
    }

    @Override
    public ForwarderMonitor toEntity() {
        return null;
    }

    @Override
    public String toJSON() throws JsonProcessingException {
        return null;
    }

    public String getFirstHost() {
        return firstHost;
    }

    public void setFirstHost(String firstHost) {
        this.firstHost = firstHost;
    }

    public boolean isFirstProgramUp() {
        return firstProgramUp;
    }

    public void setFirstProgramUp(boolean firstProgramUp) {
        this.firstProgramUp = firstProgramUp;
    }

    public boolean isFirstUmeInterfaceUp() {
        return firstUmeInterfaceUp;
    }

    public void setFirstUmeInterfaceUp(boolean firstUmeInterfaceUp) {
        this.firstUmeInterfaceUp = firstUmeInterfaceUp;
    }

    public String getSecondHost() {
        return secondHost;
    }

    public void setSecondHost(String secondHost) {
        this.secondHost = secondHost;
    }

    public boolean isSecondProgramUp() {
        return secondProgramUp;
    }

    public void setSecondProgramUp(boolean secondProgramUp) {
        this.secondProgramUp = secondProgramUp;
    }

    public boolean isSecondUmeInterfaceUp() {
        return secondUmeInterfaceUp;
    }

    public void setSecondUmeInterfaceUp(boolean secondUmeInterfaceUp) {
        this.secondUmeInterfaceUp = secondUmeInterfaceUp;
    }

    public MonitorStatus getStatus() {
        return status;
    }

    public void setStatus(MonitorStatus status) {
        this.status = status;
    }
}
